<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <link rel="stylesheet" href="//at.alicdn.com/t/font_2577096_fubdfvzcfx.css">
  <title>Document</title>
  <style>
    *{
      margin: 0;
      padding: 0;
    }
    body {
      min-height: 100vh;
      display: flex;
      justify-content: center;
      align-items: center;
    }
    .box {
      width: 350px;
      display: flex;
      flex-wrap: wrap;
      justify-content: space-between;
      align-content: space-between;
    }
    .item {
      position:relative;
      width: 170px;
      border-radius: 4px;
      overflow: hidden;
      margin-bottom: 10px;
    }
    img {
      display: block;
      width: 100%;
    }
    .mask {
      position: absolute;
      top:64px;
      left:0;
      width: 100%;
      height: 100%;
      padding: 10px;
      background-color:transparent;
      color:#fff;
      box-sizing: border-box;
      z-index: 2;
      transition: all .2s;
    }
    .title {
      font-size: 14px;
      white-space: nowrap;
      text-overflow: ellipsis;
      text-indent: 6px;
      overflow: hidden;
      margin-bottom: 4px;
    }
    .userName, .playTimes {
      font-size: 12px;
    }
    .userName {
      margin-bottom: 4px;
    }
    .item:hover .mask{
      top:0;
      background-color: rgba(0, 0, 0, .6);
      cursor: pointer;
    }
    .item:hover .mask .title {
      /* 双行省略 */
      display: -webkit-box;
      -webkit-box-orient: vertical;
      -webkit-line-clamp: 2;
      white-space: normal;
    }
    .iconfont {
      position: absolute;
      top: 60%;
      right: 20px;
      font-size: 32px;
    }
  </style>
</head>
<body>
  <div class="box">
    <div class="item">
      <img src="./image/示例图.jpg" alt="图片">
      <div class="mask">
        <p class="title">这一大长串应该是视频的名字很长很长很长很长很长很长很长很长很长很长很长很长</p>
        <p class="userName">用户名</p>
        <p class="playTimes">播放次数</p>
        <i class="iconfont icon-bofang"></i>
      </div>
    </div>
    <div class="item">
      <img src="./image/示例图.jpg" alt="图片">
      <div class="mask">
        <p class="title">这一大长串应该是视频的名字很长很长很长很长很长很长很长很长很长很长很长很长</p>
        <p class="userName">用户名</p>
        <p class="playTimes">播放次数</p>
        
      </div>
    </div>
    <div class="item">
      <img src="./image/示例图.jpg" alt="图片">
      <div class="mask">
        <p class="title">这一大长串应该是视频的名字很长很长很长很长很长很长很长很长很长很长很长很长</p>
        <p class="userName">用户名</p>
        <p class="playTimes">播放次数</p>
      </div>
    </div>
    <div class="item">
      <img src="./image/示例图.jpg" alt="图片">
      <div class="mask">
        <p class="title">这一大长串应该是视频的名字很长很长很长很长很长很长很长很长很长很长很长很长</p>
        <p class="userName">用户名</p>
        <p class="playTimes">播放次数</p>
       
      </div>
    </div>
  </div>
</body>
</html>